package com.zecan.blog.controller;

import com.zecan.blog.common.BlogResult;
import com.zecan.blog.service.ArticleService;
import com.zecan.blog.utils.BlogResultUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 归档控制类
 * @ClassName ArchivesController
 * @Description
 * @date 2022/11/26 11:19
 * @Version 1.0
 */
@RestController
@RequestMapping("/archives")
public class ArchivesController {


    @Resource
    private ArticleService articleService;

    /**
     * 归档列表返回
     * @return
     */
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public BlogResult getArchivesList() {
        return BlogResultUtils.ok(articleService.getArticleArchives(),"获取归档信息成功");
    }

}
